home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 June / SGI Freeware 1998 June.iso / dist / fw_IZzip.idb / usr / freeware / src / zip / human68k / human68k.c.z / human68k.c
C/C++ Source or Header  |  1997-09-09  |  437b  |  22 lines

  1. #include <string.h>
  2. #include <sys/stat.h>
  3.  
  4. int h68_stat(char *name, struct stat *st)
  5. {
  6.   int ret;
  7.  
  8. #if 0   /* This is not needed.  LIBC is debugged. */
  9.   if (strchr(name, '*') != NULL || strchr(name, '?') != NULL)
  10.     return -1;
  11. #endif
  12.   ret = stat(name, st);
  13.   if (ret == -1)
  14.     return -1;
  15.   if (S_ISEXBIT(st->st_mode))
  16.     st->st_mode |= S_IEXEC;
  17.   else
  18.     st->st_mode &= ~S_IEXEC;
  19.   st->st_mode &= (~022 & 0177777);
  20.   return ret;
  21. }
  22.